package org.ccay.security.exception;

/**
 * 重试
 * @author chaowangbang
 */
public class ExcessiveAttemptsException extends org.apache.shiro.authc.ExcessiveAttemptsException implements IFriendlyException{

	private static final long serialVersionUID = 20171117L;
	
	private static final String ERROR_CODE = "ccay.security.login.excessiveAttempts";
	
	/**
	 * 锁定时间（秒）
	 */
	private int lockedSecond = 0;
	
	public ExcessiveAttemptsException(int lockedSecond) {
		this.lockedSecond = lockedSecond;
	}

	public int getLockedSecond() {
		return lockedSecond;
	}

	@Override
	public String getErrCode() {
		return ERROR_CODE;
	}

	@Override
	public Object[] getArgs() {
		return new Object[]{lockedSecond};
	}

	@Override
	public String getI18nKey() {
		return ERROR_CODE;
	}
}
